export default {
  pieChartsOption: {
    title: {
      text: '检测指标',
      textStyle: {
        color: '#fff',
        fontSize: 14
      }
    },
    color: ['#289EE9', '#F5AE2F', '#FDFF00'],
    tooltip: {
      trigger: 'item',
      formatter: '{a} <br/>{b} : {c} ({d}%)'
    },
    series: [
      {
        name: '当日用电量',
        type: 'pie',
        radius: '70%',
        center: ['50%', '50%'],
        data: [
          {value: 0, name: '条目1'},
          {value: 0, name: '条目2'},
          {value: 0, name: '条目3'}
        ],
        label: {
          normal: {
            ahows: true,
            position: 'outside',
            textStyle: {
              fontWeight: 'normal',
              fontSize: 8
            }
          }
        },
        itemStyle: {
          emphasis: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }
    ]
  },
  lineChartsOption: {
    title: {
      text: '检测指标',
      textStyle: {
        color: '#fff',
        fontSize: 14
      }
    },
    color: ['#00CCFF'],
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow'
      },
      formatter: function (params) {
        return params[0].name + '<br/>' +
          params[0].seriesName + ' : ' + params[0].value
      }
    },
    grid: {
      top: 30,
      left: 40,
      right: 40,
      bottom: 20
    },
    xAxis: [
      {
        type: 'category',
        axisTick: {
          alignWithLabel: true
        },
        axisLine: {
          onZero: true,
          lineStyle: {
            color: '#ffffff'
          }
        },
        axisPointer: {
          label: {
            color: '#000000',
            formatter: function (params) {
              return /*params.name +*/ params.value +
                (params.seriesData.length ? '：' + params.seriesData[0].data : '')
            }
          }
        },
        data: ['空数据']
      }
    ],
    yAxis: [{
      type: 'value',
      // 设置轴线的属性
      axisLine: {
        lineStyle: {
          color: '#ffffff'
        }
      }
    }],
    series: [{
      name: '值',
      type: 'line',
      areaStyle: {
        normal: {color: '#00CCFF'}
      },
      smooth: true,
      data: [0],
      itemStyle: {
        normal: {
          lineStyle: {
            color: '#00CCFF'
          }
        }
      }
    }]
  },
  hBarChartsOption: {
    xAxis: {
      axisLabel: {
        textStyle: {
          color: '#fff'
        },
        showMaxLabel: true
      },
      splitLine: {
        show: false
      }
    },
    yAxis: {
      axisLabel: {
        color: '#fff'
      },
      data: ['今日高空作业', '今日动火作业', '今日有烟车间']
    },
    grid: {
      containLabel: true,
      top: 12,
      // left: 100,
      right: 10,
      bottom: 10
    },
    series: [
      {
        type: 'bar',
        stack: '总量',
        itemStyle: {
          normal: {
            color: function (params) {
              const colorList = ['#729e82', '#d9a766', '#ea7658']
              return colorList[params.dataIndex]
            }
          }
        },
        data: [5, 10, 15]
      },
      {
        type: 'bar',
        stack: '总量',
        barWidth: 10,
        itemStyle: {
          normal: {
            color: function (params) {
              const colorList = ['#fff', '#fff', '#fff']
              return colorList[params.dataIndex]
            }
          }
        },
        data: [45, 40, 35]
      }
    ]
  },
  hBarChartsOption2: {
    xAxis: {
      show: false,
      axisLabel: {
        show: false,
        textStyle: {
          color: '#fff'
        }
      },
      splitLine: {
        show: false
      }
    },
    yAxis: {
      axisLabel: {
        color: '#fff'
      },
      axisLine: {
        show: false
      },
      data: ['安全负责人', '生产负责人', '企业负责人']
    },
    grid: {
      containLabel: true,
      top: 12,
      // left: 100,
      right: 10,
      bottom: 10
    },
    series: [
      {
        type: 'bar',
        stack: '总量',
        itemStyle: {
          normal: {
            color: function (params) {
              const colorList = ['#4acdd5', '#4acdd5', '#4acdd5']
              return colorList[params.dataIndex]
            }
          }
        },
        label: {
          normal: {
            formatter: '已回复:' + '{c}',
            show: true,
            position: 'top'
          }
        },
        data: [52, 42, 52]
      },
      {
        type: 'bar',
        stack: '总量',
        barWidth: 10,
        itemStyle: {
          normal: {
            color: function (params) {
              const colorList = ['#d6d73c', '#d6d73c', '#d6d73c']
              return colorList[params.dataIndex]
            }
          }
        },
        label: {
          normal: {
            formatter: '已阅读:' + '{c}',
            show: true,
            position: 'top'
          }
        },
        data: [32, 46, 32]
      },
      {
        type: 'bar',
        stack: '总量',
        barWidth: 10,
        itemStyle: {
          normal: {
            color: function (params) {
              const colorList = ['#e92325', '#e92325', '#e92325']
              return colorList[params.dataIndex]
            }
          }
        },
        label: {
          normal: {
            formatter: '未阅读:' + '{c}',
            show: true,
            position: 'top'
          }
        },
        data: [16, 12, 16]
      }
    ]
  },
  barChartsOptions: {
    title: {
      text: '',
      textStyle: {
        color: '#fff',
        fontSize: 14
      }
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: { // 坐标轴指示器，坐标轴触发有效
        type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
      }
    },
    grid: {
      left: '15%',
      right: '4%',
      bottom: '3%',
      top: '10%',
      containLabel: true
    },
    xAxis: [
      {
        type: 'category',
        data: ['水', '电', '燃气'],
        axisTick: {
          alignWithLabel: true
        },
        axisLabel: {
          textStyle: {
            color: '#fff'
          }
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        axisLabel: {
          textStyle: {
            color: '#fff'
          }
        }
      }
    ],
    series: [
      {
        name: '占比',
        type: 'bar',
        barWidth: '20%',
        data: [10, 52, 60],
        itemStyle: {
          normal: {
            color: function (params) {
              const colorList = ['#8acaf1', '#94bf37', '#e66120']
              return colorList[params.dataIndex]
            }
          }
        }
      }
    ]
  },
  barChartsOptions2: {
    /* title: {
       text: '百分比',
       textStyle: {
         color: '#fff',
         fontSize: 14
       }
     },*/
    tooltip: {
      trigger: 'axis',
      axisPointer: { // 坐标轴指示器，坐标轴触发有效
        type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
      }
    },
    grid: {
      left: '2%',
      right: '4%',
      bottom: '3%',
      top: '10%',
      containLabel: true
    },
    dataset: {
      source: [
        ['power', '当前', '对比值'],
        ['同比', 0, 0],
        ['环比', 0, 0]
      ]
    },
    xAxis: {
      type: 'category',
      axisLabel: {
        textStyle: {
          color: '#fff'
        }
      },
      axisLine: {
        onZero: true,
        lineStyle: {
          color: '#ffffff'
        }
      },
    },
    yAxis: {
      axisLabel: {
        textStyle: {
          color: '#fff'
        }
      }
    },
    // Declare several bar series, each will be mapped
    // to a column of dataset.source by default.
    series: [
      {type: 'bar', barWidth: '20%',color:'#67e0e3'},
      {type: 'bar', barWidth: '20%',color:'#37a2da'}
    ]
  }


}
